<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateHomeLoginInfoTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('home_login_info', function (Blueprint $table) {
            $table->increments('id');
            $table->string('lastlogin_ip')->comemnt('登录IP');
            $table->timestamp('lastlogin_time')->comment('上次登录时间');
            $table->timestamp('lastlogout_time')->comment('上次登出时间')->nullable();;
            $table->tinyInteger('pass_wrong_status')->unsigned()->comment('密码登录错误状态, 0:正确, 2:错误');
            $table->integer('uid');
            $table->string('attr1', 50)->nullable();
            $table->string('attr2', 100)->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('home_login_info');
    }
}
